package com.atguigu.tingshu.account.rpc;

import com.atguigu.tingshu.account.service.UserAccountService;
import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.vo.account.AccountLockResultVo;
import com.atguigu.tingshu.vo.account.AccountLockVo;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/inner/accountinfo")
public class UserAccountRpcController {
    @Autowired
    private UserAccountService userAccountService;


    @PostMapping("/checkAndLockAccount")
    @Operation(summary = "检验并且锁定账户余额")
    Result<AccountLockResultVo> checkAndLockAccount(@RequestBody AccountLockVo accountLockVo) {
        return userAccountService.checkAndLockAccount(accountLockVo);

    }
}
